home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / freaky-fun.swf / scripts / frame_7 / PlaceObject2_203_174 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-07  |  1.2 KB  |  53 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.playGame)
  3.    {
  4.       _root.falling = move(0,s);
  5.       if(Key.isDown(32) && !_root.falling && !_root.jumping)
  6.       {
  7.          vel = -12;
  8.          _root.jumping = true;
  9.          _root.bounceSnd.gotoAndPlay(2);
  10.       }
  11.       if(Key.isDown(38) && !_root.falling && !_root.jumping)
  12.       {
  13.          vel = -12;
  14.          _root.jumping = true;
  15.          _root.bounceSnd.gotoAndPlay(2);
  16.       }
  17.       if(Key.isDown(37) and _X > 10)
  18.       {
  19.          move(- s,0);
  20.          this.gotoAndStop(2);
  21.          this.heroClip.nextFrame();
  22.       }
  23.       if(Key.isDown(39) and _X < 490)
  24.       {
  25.          move(s,0);
  26.          this.gotoAndStop(1);
  27.          this.heroClip.nextFrame();
  28.       }
  29.       if(_root.jumping)
  30.       {
  31.          this._rotation = r;
  32.          if(vel <= 12)
  33.          {
  34.             h = move(0,vel - s);
  35.             if(h == false && vel < 0)
  36.             {
  37.                vel *= -1;
  38.             }
  39.             vel++;
  40.          }
  41.          else
  42.          {
  43.             _root.jumping = false;
  44.          }
  45.       }
  46.    }
  47.    if(this._y > 320)
  48.    {
  49.       _root.playGame = false;
  50.       _root.hero.gotoAndStop(3);
  51.    }
  52. }
  53.